﻿@model NB.MGJ.Model.Marketing_All
@using NB.MGJ.Model
@using NB.MGJ.Common
@{
    Layout = null;
}
@*大转盘*@

<script src="~/Scripts/Bootstrap/js/bootstrap-select.js" charset="utf-8" type="text/javascript"></script>
<link href="~/Scripts/Bootstrap/css/bootstrap-select.min.css" rel="stylesheet" />
<link href="~/Content/MarketCss/animate.min.css" rel="stylesheet" />
<link href="~/Content/CommonCss/jqueryUI/jquery-ui.css" rel="stylesheet" />
<script src="~/Content/CommonCss/jqueryUI/jquery-ui.js"></script>
<link href="~/Scripts/Bootstrap/css/bootstrap-datepicker3.min.css" rel="stylesheet" />
<script src="~/Scripts/Bootstrap/js/bootstrap-datepicker.js"></script>
<link href="~/Content/MarketCss/TurntableActivity.css" rel="stylesheet" />
<script src="~/Content/CommonCss/jqueryUI/jquery.cookie.js"></script>
<link href="~/Content/MarketCss/CreateActivities.css" rel="stylesheet" />
<script src="~/Scripts/MGJJS/Market/CreateActivities.js"></script>
<script src="~/Scripts/MGJJS/Market/TurntableActivity.js"></script>


<script>
    var Aid = '@ViewBag.Aid';
    if (Aid != "0") { $.MGJ.TableEggsActivity.Ajax_Initialization(Aid); }
    function OneKeyAttention(ele, event) {
        $(ele).css('display', 'none');
        event.stopPropagation();
    }
    function Attention(event) {
        event.stopPropagation();
    }
</script>

<div class="padding15" id="app">
    <ul class="myTabs nav nav-tabs" id="level1">
        <li class="active">
            <a href="#red1" id="redIndex" data-toggle="tab">首页</a>
        </li>
        <li>
            <a href="#red2" id="RuleExplain" data-toggle="tab">活动规则</a>
        </li>
        <li>
            <a href="#red3" data-toggle="tab">我的奖品</a>
        </li>
        <li>
            <a href="#red4" id="award-details" data-toggle="tab" onclick="$('#award-setting').click()">奖品详情</a>
        </li>
        <li>
            <a href="#red5" data-toggle="tab">手机验证</a>
        </li>
        <li>
            <a href="#red6" id="hadAward" data-toggle="tab">中奖页面</a>
        </li>
        <li>
            <a href="#red7" id="hadNoAward" data-toggle="tab">没中奖页</a>
        </li>
        <li>
            <a href="#red8" data-toggle="tab">奖品被领取</a>
        </li>
        <li>
            <a href="#red9" id="getFinishAward" data-toggle="tab">奖品领取完成</a>
        </li>
        <li>
            <a href="#red10" data-toggle="tab">活动未开始</a>
        </li>
        @*<a class="btn btn-success" style="margin-top:6px;margin-left:20px;" onclick="">预览</a>*@
        <button class="btn btn-success" id="finalSave" onclick="$.MGJ.TableEggsActivity.Ajax_Save()">保存</button>
    </ul>
    <div class="con">
        <div class="left-con">
            <div class="input-hidden-con">
                <input type="hidden" name="ActivityType" value="2" />
                <input type="hidden" id="TemId" />
            </div>
            <div id="phone">
                <div class="tab-content">
                    <div id="red1" class="tab-pane fade active in phoneView red-con">
                        <p class="pageTitle hoverShowEdit">
                            <span id="pageTitle">幸运九宫格</span>
                            <a class="clickEdict clickEdict-top" onclick="$('#basicData').click(); clickEdictTitle(this, '#Title');">编辑</a>
                        </p>
                        <img class="bgImg resizable" onclick="clickEdictBg(this)" data-toggle="modal" data-target="#myModal" title="点击可编辑" src="/Content/webImgs/Market/Turntable/dzp.png">
                        <div title="点击后可编辑" onclick="clickEdict(this)" class="resizable draggable EnterpriseLogo  resizableEdit" style="z-index: 110; display:none;">
                            <a id="companyLogo" class="clickEdict clickEdict-top" onclick="changeIMG(this)" data-toggle="modal" data-target="#myModal">编辑</a>
                            <img src="~/Content/webImgs/upLogo/cp_img_tj.png" style="max-width: 100%; max-height: 100%; border-radius:4px;" />
                        </div>
                        
                        <div class="resizable draggable title animated bounceInDown resizableEdit" onclick="clickEdict(this)" title="点击可编辑">
                            <a class="clickEdict clickEdict-bottom" onclick="changeIMG(this)" data-toggle="modal" data-target="#myModal">编辑</a>
                            <img src="/Content/webImgs/Market/Turntable/d1.png" />
                        </div>
                        <div id="jgg" style="position:absolute;" title="点击可编辑" onclick="clickEdict(this)" class="resizable draggable resizableEdit">
                            <a class="clickEdict clickEdict-bottom" onclick="changeNineIMG(this)" data-toggle="modal" data-target="#tableModal">编辑</a>
                            <div class="middle" style="z-index: 103;">
                                <div class="draw" id="lottery">
                                    <table>
                                        <tr>
                                            <td class="item lottery-unit lottery-unit-0">
                                                <div class="img">
                                                    <img id="img0" class="img0" src="" alt="">
                                                </div>
                                            </td>
                                            <td class="item lottery-unit lottery-unit-1">
                                                <div class="img">
                                                    <img id="img1" class="img1" src="" alt="">
                                                </div>
                                            </td>
                                            <td class="item lottery-unit lottery-unit-2">
                                                <div class="img">
                                                    <img id="img2" class="img0" src="" alt="">
                                                </div>
                                            </td>
                                            <td class="item" style="display:none;">
                                                <div class="img">
                                                    <img src="" alt="">
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="item lottery-unit lottery-unit-7">
                                                <div class="img">
                                                    <img id="img7" class="img1" src="" alt="">
                                                </div>
                                            </td>
                                            <!--Go-->
                                            <td id="center_td" class="item">
                                                <a class="clickRequest">
                                                    <img id="go" src="" />
                                                </a>
                                            </td>
                                            <td class="item lottery-unit lottery-unit-3">
                                                <div class="img">
                                                    <img id="img3" class="img1" src="" alt="">
                                                </div>
                                            </td>
                                        </tr>
                                        <tr style="display:none;">
                                            <td class="item">
                                                <div class="img">
                                                    <img src="" alt="">
                                                </div>
                                            </td>
                                            <td class="item">
                                                <div class="img">
                                                    <img src="" alt="">
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="item lottery-unit lottery-unit-6">
                                                <div class="img">
                                                    <img id="img6" class="img0" src="" alt="">
                                                </div>
                                            </td>
                                            <td class="item lottery-unit lottery-unit-5">
                                                <div class="img">
                                                    <img id="img5" class="img0" src="" alt="">
                                                </div>
                                            </td>
                                            <td class="item lottery-unit lottery-unit-4">
                                                <div class="img">
                                                    <img id="img4" class="img0" src="" alt="">
                                                </div>
                                            </td>
                                            <td class="item" style="display:none;">
                                                <div class="img">
                                                    <img src="" alt="">
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </div>

                        <div id="bg-con" class="bg-con">
                            <div class="small-bg animated bounceInDown AwardsDown">
                                <p>
                                    <span style="width:30%;">
                                        <img id="awardImg" style="width:100%" src="">
                                    </span>
                                </p>
                                <p>
                                    <span style="width:30%;background-color:orange;border-radius:20px;text-align:center;"></span>
                                </p>
                                <p>
                                    <span></span>
                                </p>
                            </div>
                            <div class="animated zoomIn">
                                <a style="color:white;text-decoration:none;" class="add">马上领取</a>
                            </div>
                        </div>
                        <div class="rulebg-con" style="display:none"></div>

                        @*抽奖机会*@
                        <div class="middle_bottom">
                            <p>您今天还有<span id="ChanceNum" style="color:orange;font-weight:700;">1</span>次抽奖机会</p>
                            <p><a id="Rules">查看活动规则>></a></p>
                        </div>
                        @*中奖名单*@
                        <div class="roasting roasting resizable draggable" id="rollInfo" style="display: none;">
                            <ul class="roll">
                                <li style="font-size:15px;">中奖名单</li>
                                <li>
                                    <span>小沈*</span>
                                    <span>抽中五等奖</span>
                                    <span>时间</span>
                                </li>
                                <li>
                                    <span>小沈*</span>
                                    <span>抽中五等奖</span>
                                    <span>时间</span>
                                </li>
                                <li>
                                    <span>小沈*</span>
                                    <span>抽中五等奖</span>
                                    <span>时间</span>
                                </li>
                            </ul>
                        </div>

                        <div class="defaultInfo">
                            <span>已有</span>
                            <span style="margin:0 5px;color:#F9BF26;font-size:20px" id="aCount">0</span>
                            <span>人参加活动</span>
                        </div>

                        <a style="text-decoration:none;" onclick="$('.OneKeyAttention').css('display','block')" class="surport">技术支持：码管家云系统 版权所有</a>
                        <div class="OneKeyAttention" onclick="OneKeyAttention(this, event)">
                            <div class="Attention-con" onclick="Attention(event)">
                                <img id="companyWeixinCode" src="//15448716.h40.faiusr.com/4/8/ACgIABAEGAAg09bd0QUo9_7GejCYAjiYAg.png" alt="Alternate Text" />
                                <img src="//avrilbucket.oss-cn-beijing.aliyuncs.com/f5331270-cafc-41be-ad78-973210497581zhiwen.png" alt="Alternate Text" />
                                <p>长按指纹 识别二维码</p>
                            </div>

                            <div class="closeBgCon">
                                <img class="closeBg" src="//avrilbucket.oss-cn-beijing.aliyuncs.com/0076e1b0-c3c7-45c8-bd6a-6f708b4b06d8redPacket-051.png" alt="Alternate Text" />
                            </div>
                        </div>
                    </div>
                    <div id="red2" class="tab-pane fade phoneView">
                        <div class="bg-con" style="display:block">
                            <div class="insert hoverShowEdit">
                                <a class="clickEdict clickEdict-top" onclick="$('#basicData').click(); clickEdictWord(this, '#RuleExplainTextarea');">编辑</a>
                                <h3 class="rule-title">活动规则</h3>
                                <div class="rule-content">
                                    <pre id="bindRuleExplain">
1、红包/验证码/预约券仅限购买meilele.com官网商品使用，不能兑换成现金。
2、每个订单只能使用1个红包/验证码/预约券。
3、在有效使用时间内使用，过期未使用自动作废。
                                    </pre>
                                </div>
                            </div>
                            <div class="closeBgCon">
                                <img class="closeBg" src="//avrilbucket.oss-cn-beijing.aliyuncs.com/0076e1b0-c3c7-45c8-bd6a-6f708b4b06d8redPacket-051.png" alt="Alternate Text" />
                            </div>
                        </div>
                    </div>
                    <div id="red3" class="tab-pane fade phoneView" >
                        <p class="pageTitle">
                            <span>我的奖品</span>
                        </p>
                        <ul class="my-award" style="background:url('http://localhost:31924/Content/webImgs/Market/Turntable/d10.png');background-size: 100% 100%;">
                            <li style="display:flex;align-items:center;justify-content:space-around;padding-bottom:5px;border-bottom:1px solid;" class="SkipAwInfo">
                                <div>
                                    <div>获得2元微信现金红包</div>
                                    <div class="atDataTime">2017-11-08</div>
                                </div>
                                <button class="btn btn-default">已领取</button>
                            </li>

                        </ul>
                    </div>
                    <div id="red4" class="tab-pane fade phoneView" >
                        <div class="OneKeyAttention" onclick="OneKeyAttention(this, event)">
                            <div class="Attention-con" onclick="Attention(event)">
                                <img id="awardsUpCode" src="//15448716.h40.faiusr.com/4/8/ACgIABAEGAAg09bd0QUo9_7GejCYAjiYAg.png" alt="Alternate Text" />
                                <img src="//avrilbucket.oss-cn-beijing.aliyuncs.com/f5331270-cafc-41be-ad78-973210497581zhiwen.png" alt="Alternate Text" />
                                <p>长按指纹 识别二维码</p>
                            </div>
                            <div class="closeBgCon">
                                <img class="closeBg" src="//avrilbucket.oss-cn-beijing.aliyuncs.com/0076e1b0-c3c7-45c8-bd6a-6f708b4b06d8redPacket-051.png" alt="Alternate Text" />
                            </div>
                        </div>
                        <div class="award-details" >
                            <div class="award-head">
                                <p id="EnterpriseName">
                                    @ViewBag.Ename
                                </p>
                                <h3 id="AwName" style="margin:10px 0;color:white">
                                    微信红包2元
                                </h3>
                                <p class="atDataTime"></p>
                            </div>
                            <div class="award-body">
                                <p>活动码454545112123</p>
                                <p id="handleTips">
                                    红包已存入你的零钱
                                </p>
                            </div>
                            <div class="award-details-list" style="margin-top:20px;">
                                <span>奖品详情</span>
                            </div>
                            <div class="award-details-list">
                                <span>使用须知：</span>
                                <span id="MustKnow">需满100</span>
                                <span></span>
                            </div>
                            <div class="award-details-list for-red" style="margin-top:20px;display:flex">
                                <span>客服电话：</span>
                                <span id="ServicePhone">3560339</span>
                                <span></span>
                            </div>
                            <div class="award-details-list  DefineBtnTypeClose  DefineBtnLink" style="display:none">
                                <a href="javascript:void(0)" id="defindBtn" target="_blank">企业官网：</a>
                            </div>
                            <div onclick="AwAttention()" class="award-details-list DefineBtnTypeClose DefineBtnAll" style="display:none">
                                <a id="focusUs">关注我们</a>
                            </div>
                        </div>
                    </div>
                    <div id="red5" class="tab-pane fade phoneView">
                        <p class="pageTitle">
                            <span>手机验证</span>
                        </p>
                        <div class="phone" style="background-image: url('http://localhost:31924/Content/webImgs/Market/Turntable/d10.png');background-size: 100% 100%;">
                            <p>验证手机号：</p>
                            <p>为确保您的红包准确到账，请验证手机号码。</p>
                            <div class="phone-num">
                                <span>+86</span>
                                <input style="flex:1" id="phoneNum" type="text" placeholder="请填写手机号码" autofocus>
                            </div>
                            <div class="phone-num">
                                <input style="width:60%;padding-left:5px;" type="text" placeholder="请输入短信验证码" autofocus id="SMS">
                                <input type="button" id="GetSMS" style="color: #826A50;width:40%;" value="获取验证码">
                            </div>
                            <a class="sure" id="PhoneSure"> 确定 </a>
                            <div class="user-info">
                                <ul>
                                    <li style="margin-top:30px;color:#BFBFBF;justify-content:center;">暂无用户中奖</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div id="red6" class="tab-pane fade phoneView">
                        <div id="bg-con" class="bg-con" style="display:block;">
                            <div class="small-bg animated bounceInDown">
                                <p>
                                    <span>
                                        <img id="awardImg" style="width:100%" src="/Content/webImgs/Market/Turntable/d3.png" />
                                    </span>
                                </p>
                                <p>
                                    <span>10元</span>
                                </p>
                                <p>
                                    <span id="Congrats1">一等奖</span>
                                </p>
                            </div>
                            <div class="receive">
                                <a class="add animated zoomIn">马上领取</a>
                            </div>
                        </div>
                    </div>
                    <div id="red7" class="tab-pane fade phoneView">
                        <div class="bg-con" style="display:block">
                            <div class="insert">
                                <div title="点击后可编辑" onclick="clickEdict(this)" class="animated bounceInDown awardInfo resizable draggable resizableEdit">
                                    <a class="clickEdict clickEdict-bottom" onclick="changeIMG(this)" data-toggle="modal" data-target="#myModal">编辑</a>
                                    <img src="//avrilbucket.oss-cn-beijing.aliyuncs.com/5a4b889b-f312-4b51-b141-d5518cc1cde9meiyou.png" alt="Alternate Text" />
                                </div>
                                <div class="BTN-group" style="display:flex;align-items:center;margin:15px 0;">
                                    <a class="btn btn-warning continueSaoMa" onclick="SaoMa()" style="flex:1">继续扫码</a>
                                    <a class="btn btn-warning Award-Record" style="flex:1;margin-left:10px;">领奖记录</a>
                                </div>
                                <a id="FunctionLink" class="btn btn-warning  btn-block FunctionBtnTypeClose FunctionBtnLink" style="display:none">企业官网</a>
                                <a onclick="BtnCustom()" id="FunctionFocus" class="btn btn-warning  btn-block FunctionBtnTypeClose FunctionBtnAll" style="display:none">自定义按钮</a>
                            </div>
                            <div class="closeBgCon">
                                <img class="closeBg" src="//avrilbucket.oss-cn-beijing.aliyuncs.com/0076e1b0-c3c7-45c8-bd6a-6f708b4b06d8redPacket-051.png" alt="Alternate Text" />
                            </div>
                        </div>
                    </div>
                    <div id="red8" class="tab-pane fade phoneView">
                        <div class="bg-con" style="display:block">
                            <div class="insert">
                             
                                <div title="点击后可编辑" onclick="clickEdict(this)" class="animated bounceInDown awardInfo resizable draggable resizableEdit ">
                                    <a class="clickEdict clickEdict-bottom" onclick="changeIMG(this)" data-toggle="modal" data-target="#myModal">编辑</a>
                                    <img src="//shnbbucket.oss-cn-beijing.aliyuncs.com/20180313155510.png" alt="Alternate Text" />
                                    <p id="getAwardName" style="position: absolute;bottom: 0;padding: 3px 0;border-radius: 3px;text-align: center;color:white;width:100%">奖品已被<span>***</span>领取</p>
                                </div>
                                <div class="BTN-group" style="display:flex;align-items:center;margin:15px 0;">
                                    <a class="btn btn-warning continueSaoMa" onclick="SaoMa()" style="flex:1">继续扫码</a>
                                    <a class="btn btn-warning Award-Record" style="flex:1;margin-left:10px;">领奖记录</a>
                                </div>
                                <a id="FinishFunctionLink" class="btn btn-warning  btn-block FunctionBtnTypeClose FunctionBtnLink" style="display:none">企业官网</a>
                                <a onclick="BtnCustom()" id="FinishFunctionFocus" class="btn btn-warning  btn-block FunctionBtnTypeClose FunctionBtnAll" style="display:none">关注我们</a>
                            </div>
                            <div class="closeBgCon">
                                <img class="closeBg" src="//avrilbucket.oss-cn-beijing.aliyuncs.com/0076e1b0-c3c7-45c8-bd6a-6f708b4b06d8redPacket-051.png" alt="Alternate Text" />
                            </div>
                        </div>
                    </div>
                    <div id="red9" class="tab-pane fade phoneView">
                        <p class="pageTitle">
                            <span>奖品领取完成</span>
                        </p>
                        <div class="result" style="background-color: #310b44;">
                            <img src="//avrilbucket.oss-cn-beijing.aliyuncs.com/d125f2fa-6042-41cc-a116-161780c98783redPacket-04B.png" alt="">
                            <p>红包领取成功</p>
                            <p>已存入微信零钱</p>
                            <div class="longTab">
                                <div class="resizable draggable" title="点击后可编辑" onclick="clickEdict(this)">
                                    <a id="PublicCode" class="clickEdict clickEdict-top" onclick="changeIMG(this)" data-toggle="modal" data-target="#myModal">编辑</a>
                                    <img id="QRcode" src="@Model.webInfo.WXCodeImgUrl" alt="Alternate Text" />
                                </div>

                                <img src="~/Content/webImgs/Market/redPacket/zhiwen.svg" />
                            </div>
                            <p>长按关注公众号</p>
                            <div class="Bottom">
                                <a href="javascript:closePage();" class="aBtn">关闭</a>
                                <a class="aBtn" onclick="showResult(this)">中奖纪录</a>
                            </div>
                            <div class="bg-con">
                                <div class="info animated bounceIn" style="background-image: url('/Content/webImgs/Market/Turntable/d10.png'); color: #FDBE9B;">
                                    <h2>中奖纪录</h2>
                                    <ul class="my-award">
                                        <li class="SkipAwInfo">
                                            <a>
                                                <div>
                                                    <div>获得2元微信现金红包</div>
                                                    <div class="atDataTime">2017-11-08</div>
                                                </div>
                                                <button class="btn btn-default">已领取</button>
                                            </a>
                                        </li>

                                    </ul>
                                </div>
                                <div class="closeBgCon">
                                    <img class="closeBg" src="//avrilbucket.oss-cn-beijing.aliyuncs.com/0076e1b0-c3c7-45c8-bd6a-6f708b4b06d8redPacket-051.png" alt="Alternate Text" />
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="red10" class="tab-pane fade phoneView">
                        <p class="pageTitle">
                            <span>活动未开始</span>
                        </p>
                        <div class="activityIsNot">
                            <div class="activityTips">
                                <img src="~/Content/webImgs/Market/redPacket/tips.svg" style="max-width:100%;max-height:80%" />
                                <p style="text-align:center;font-size:18px;margin-top:20px;">活动未开始</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="right-con">
            <ul class="nav nav-tabs" id="level2">
                <li class="active">
                    <a href="#award1" id="basicData" data-toggle="tab">基础设置</a>
                </li>
                <li>
                    <a href="#award2" data-toggle="tab">派奖方式</a>
                </li>
                <li>
                    <a href="#award3" id="award-setting" data-toggle="tab">奖项设置</a>
                </li>
                <li>
                    <a href="#award4" data-toggle="tab">高级设置</a>
                </li>
            </ul>
            <div class="tab-content" id="level2-content">
                <!-----------------------------基础设置-------------------------------------->
                <div id="award1" class="tab-pane fade active in">
                    <form id="activity_form" class="form-horizontal formCheck">
                        <input type="hidden" name="Id" value="@Model.activity.Id" />
                        <input type="hidden" name="ActivityType" value="@ViewBag.ActivityType" />
                        <div class="form-group">
                            <div class="col-md-2 text-right">
                                <span class="red-600">*</span>
                                <img src="~/Content/webImgs/Market/redPacket/diamond.png" style="width:15px;height:13px" />
                                生码批次：
                            </div>

                            <div class="col-sm-4" id="divBatch">
                                <input type="hidden" name="batch" id="batchInput" value="" />
                                <select title="请选择生码批次" name="BatchBox" id="batch" class="form-control JackpotID" data-live-search="true" data-live-search-placeholder="Search" data-actions-box="true" onchange="ChangeBatchNum(this)"></select>
                                &nbsp;&nbsp;&nbsp;
                                <span style="color: #50AE55; height: 25px; padding: 2px; ">
                                    批次数量：
                                    <span id="batchNum"></span>
                                </span>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-md-2 text-right">
                                <span class="red-600">*</span>活动标题：
                            </div>
                            <div class="col-md-9 forTime">
                                <input type="text" onclick="$('#redIndex').click()" onfocus="$(this).removeClass('inputShadow')" onchange="doubleBind(this, 'pageTitle')" onkeyup="doubleBind(this, 'pageTitle')" name="Title" id="Title" placeholder="活动标题" class="form-control" value="@Model.activity.Title" />
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-md-2 text-right"><span class="red-600">*</span>活动时间：</div>
                            <div class="col-md-4 forTime">
                                @if (Model.activity.StartDate.HasValue)
                                {
                                    <input type="text" id="StartDate" placeholder="活动开始时间" name="StartDate" class="form-control" value="@Model.activity.StartDate.Value.ToString("yyyy-MM-dd")" onchange="doubleBind(this, 'startTime')" />
                                }
                                else
                                {
                                    <input type="text" id="StartDate" placeholder="活动开始时间" name="StartDate" class="form-control" />
                                }
                            </div>
                            <div class="col-md-1 text-center">至</div>
                            <div class="col-md-4 forTime">
                                @if (Model.activity.EndDate.HasValue)
                                {
                                    <input placeholder="活动结束时间" id="EndDate" type="text" name="EndDate" class="form-control" value="@Model.activity.EndDate.Value.ToString("yyyy-MM-dd")" onchange="doubleBind(this, 'endTime')" />
                                }
                                else
                                {
                                    <input placeholder="活动结束时间" id="EndDate" type="text" name="EndDate" class="form-control" />

                                }
                            </div>
                        </div>


                        @*<div class="form-group">
                <div class="col-md-2 text-right">活动时间：</div>
                <div class="col-md-4 forTime">
                        <input type="text" id="StartDate" placeholder="活动开始时间" name="StartDate" class="form-control" />
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-2 text-right">活动时间：</div>
                <div class="col-md-4 forTime">
                    <input placeholder="活动结束时间" id="EndDate" type="text" name="EndDate" class="form-control" />
                </div>
            </div>*@


                        <div class="form-group">
                            <div class="col-md-2 text-right">
                                <img src="~/Content/webImgs/Market/redPacket/diamond.png" style="width:15px;height:13px" />
                                活动区域：
                            </div>
                            <div class="col-md-5">
                                <a id="IsLimit" onclick="IsLimitAreaFun(this)">限制区域</a>
                            </div>
                            <div class="col-md-4">
                                <input type="hidden" name="IsLimitArea" id="IsLimitArea" value="@Model.activity.IsLimitArea" />
                            </div>
                        </div>
                        <div class="form-group" style=" display:none">
                            <div class="col-md-2 text-right"></div>
                            <div class="col-sm-4">
                                <select id="Privance" class="form-control" data-live-search="true" data-live-search-placeholder="Search" data-actions-box="true" title="请选择省" onchange="Choose(this.id, 'City', '0')">
                                    <option selected>请选择省</option>
                                </select>
                            </div>
                            <div class="col-md-1 text-center"></div>
                            <div class="col-sm-4" id="csdivid">
                                <select id="City" class="form-control " data-live-search="true" data-live-search-placeholder="Search" data-actions-box="true" onchange="Choose(this.id, 'Region', '0')" title="请选择市">
                                    <option selected>请选择市区</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group" style="display:none;">
                            <div class="col-md-2 text-right">
                                <img src="~/Content/webImgs/Market/redPacket/diamond.png" style="width:15px;height:13px" />
                                奖励对象：
                            </div>
                            <div class="col-md-9">

                                <input type="radio" name="RewardObject" value="0" checked="checked" id="customerAll" />
                                &nbsp;
                                <label for="customerAll">所有扫码客户</label>
                                &nbsp;  &nbsp;

                                <input type="radio" name="RewardObject" value="1" id="customerPublic" />
                                &nbsp;
                                <label for="customerPublic">关注公众号</label>
                                &nbsp;  &nbsp;
                                <a href="#">查看示例</a>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-md-2 text-right"><span class="red-600">*</span>活动规则：</div>
                            <div class="col-md-9 forTime">
                                <textarea  id="RuleExplainTextarea" style="height:120px" class="form-control" onfocus="$('#RuleExplain').click()" name="RuleExplain" onchange="doubleBind(this, 'bindRuleExplain')" onkeyup="doubleBind(this, 'bindRuleExplain')" placeholder="活动规则  回车换行">@Model.activity.RuleExplain</textarea>
                            </div>
                        </div>
                        @*<div class="form-group">
                <div class="col-md-8" style="display:flex;align-items:center;justify-content:space-around">
                    <a href="#">* 红包设置教程</a>
                    <a href="#">* 优惠券设置教程</a>
                    <a href="#">* 流量包设置教程</a>
                </div>

            </div>*@
                    </form>
                </div>
                <!-----------------------------派奖方式-------------------------------------->
                <div id="award2" class="tab-pane fade">
                    <form id="delivery_form" class="form-horizontal formCheck" onkeydown="if(event.keyCode==13){return false;}">
                        <input hidden name="ID" value="@Model.delivery.ID" />
                        <div class="form-group">
                            <div class="col-md-2 text-right">派奖方式：</div>
                            <div class="col-md-4">
                                <select name="DeliveryType" id="" class="form-control JackpotID">
                                    <option value="1"> 企业微信转账支付</option>
                                </select>
                            </div>
                            <div class="col-md-4"></div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-2 text-right">抽奖门槛：</div>
                            <div class="col-md-9">
                                扫描有效促销活动码即可参与抽奖
                            </div>
                        </div>
                        <div class="form-group parent" style="display:none;">
                            <div class="col-md-2 text-right">快捷重复抽奖：</div>
                            <div class="col-md-3">
                                <input type="radio" name="IsRepetition" value="0" id="close" onchange="IsShow('0', '.IsRepetitionTxt')" />
                                &nbsp;
                                <label for="close">关闭</label>
                                &nbsp;  &nbsp;
                                <input type="radio" name="IsRepetition" value="1" id="open" onchange="IsShow('1', '.IsRepetitionTxt')" checked="checked" />
                                &nbsp;
                                <label for="open">开启</label>
                            </div>
                            <div class="col-md-7 IsRepetitionTxt">
                                开启后，玩家抽奖后若不中奖可直接点击继续抽奖（无需重复扫码）
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-2 text-right"><span class="red-600">*</span>总抽奖机会：</div>
                            <div class="col-md-5">
                                <input id="allChance" type="text" name="EachGetSumNum" value="@Model.delivery.EachGetSumNum" class="form-control" style="width:20%;display:inline-block"/>
                                次
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-2 text-right"><span class="red-600">*</span>每日抽奖机会：</div>
                            <div class="col-md-5">
                                每人每日有
                                <input id="dayChance" type="text" name="DayGetPrizeNum" value="@Model.delivery.DayGetPrizeNum" class="form-control" style="width:20%;display:inline-block" />
                                次抽奖机会
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-2 text-right"><span class="red-600">*</span>每人中奖次数：</div>
                            <div class="col-md-5">
                                每人最多可中奖
                                <input id="oneChance" type="text" name="EachGetPrizeNum" value="@Model.delivery.EachGetPrizeNum" class="form-control" style="width:20%;display:inline-block" />
                                次
                            </div>
                        </div>
                    </form>

                </div>
                <!-----------------------------奖项设置-------------------------------------->
                <div id="award3" class="tab-pane fade">
                    <div class="row" style="display:none;">
                        <div class="col-md-6 text-left">设置活动需要派发的奖项</div>
                        <div class="col-md-6 text-right">
                            <input type="checkbox" name="name" id="set" />
                            <label for="set">安慰奖设置</label>
                        </div>
                    </div>

                    <div style="float:right;">
                        <button id="del" type="button" class="btn btn-default btn-sm" style="border:none;">
                            <span class="glyphicon glyphicon-minus" aria-hidden="true"></span>
                        </button>
                        <button id="add" type="button" class="btn btn-default btn-sm" style="border:none;">
                            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                        </button>
                    </div>
                    <ul id="myTab" class="myTabs nav nav-tabs">
                        <li class="active">
                            <a href="#Award01" data-toggle="tab" onclick="$.MGJ.TableEggsActivity.SkipTab(1)">奖项一</a>
                        </li>
                        @{
                            for (int i = 2; i <= @Model.awardsList.Count; i++)
                            {
                                var fromIdHref = "Award0" + i;
                                var tabName = "奖项"+i;
                                <li>
                                    <a href="#@fromIdHref" data-toggle="tab" onclick="$.MGJ.TableEggsActivity.SkipTab(@i)"> @tabName</a>
                                </li>
                            }
                        }
                    </ul>

                    <div id="myTabContent" class="tab-content" style="margin-top:10px;">
                        @{
                            var fromId = "Award0";
                            var AwardsGrade = "AwardsGrade";//奖项等级
                            var JackpotType = "JackpotType";//奖项类型
                            var JackepotNum = "JackepotNum";//奖品可用数量
                            var JackpotID = "JackpotID";//指定奖项
                            var Name = "Name";//操作提示 奖项名称
                            var TotalNums = "TotalNums";//总数量
                            var TotalMoney = "TotalMoney";//总金额
                            var Rate = "Rate";//中奖率
                            var point = "point";//操作提示

                            //详情设置；
                            var ServicePhone = "ServicePhone";//客服电话
                            var Remark = "Remark";//使用须知
                            var defineClose = "defineClose";//关闭
                            var defineOpen = "defineOpen";//页面跳转
                            var defineAll = "defineAll";//一键关注
                            var ButtonName = "ButtonName";//按钮名称
                            var ButtonHref = "ButtonHref";//按钮链接
                            var WxCodeImg = "WxCodeImg";//微信公众号二维码

                            var AwardsIosUrl = "AwardsIosUrl";//奖项图标
                            var awardsUp = "awardsUp";//一键关注 图片上传按钮
                            var awardsUpImg = "awardsUpImg";//一键关注 上传的显示图片


                            var DefineBtnTypeClose = "DefineBtnTypeClose";

                            var DefineBtnLink = "DefineBtnLink";
                            var DefineBtnAll = "DefineBtnAll";

                            int awardsIndex = 1;
                            //编辑
                            for (int i = 0; i < @Model.awardsList.Count; i++)
                            {
                                var j = i + 1;
                            awardsIndex++;
                            var classformName = j == 1 ? "tab-pane active in form-horizontal parent AwardTab formCheck" : "tab-pane  in form-horizontal parent AwardTab formCheck";

                                <form id="@fromId@j" role="tabpanel" class="@classformName">
                                    <input type="hidden" name="id" value="@Model.awardsList[i].Id" />
                                    <!--排序-->
                                    <input type="hidden" name="Sequence" value="@Model.awardsList[i].Sequence" />
                                    <!--奖项图标-->
                                    <input type="hidden" name="AwardsIosUrl" id="@AwardsIosUrl@j" value="@Model.awardsList[i].AwardsIosUrl" />
                                    <div class="form-group">
                                        <div class="col-md-2 text-right">奖项等级：</div>
                                        <div class="col-md-4">
                                            <select name="AwardsGrade" id="@AwardsGrade@j" class="form-control" onchange="doubleGradeBind(this,@j)">
                                                <option value="1" selected>一等奖</option>
                                                <option value="2">二等奖</option>
                                                <option value="3">三等奖</option>
                                                <option value="4">四等奖</option>
                                                <option value="5">五等奖</option>
                                                <option value="6">六等奖</option>
                                                <option value="7">七等奖</option>
                                                <option value="8">八等奖</option>
                                            </select>
                                        </div>
                                        <div class="col-md-4"></div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right">奖项类型：</div>
                                        <div class="col-md-4">
                                            <select name="Type" id="@JackpotType@j" class="form-control " onchange="changeJackpotType(this,1)">
                                                <option value="1">红包</option>
                                                <option value="3">流量包</option>
                                            </select>
                                        </div>
                                        @*<div class="col-md-4">
                                            <a href="#" onclick="$.MGJ.Common.loadurl(this, '/Market/JackpotManage')">创建红包</a>
                                        </div>*@
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right">指定奖项：</div>
                                        <div class="col-md-4">
                                            <select name="JackpotID" id="@JackpotID@j" class="form-control " onchange="$.MGJ.TableEggsActivity.GetAwardNum(@j)"></select>
                                        </div>
                                        <div class="col-md-5">奖品可用数量:<span style="color:#50AE55" id="@JackepotNum@j"></span> </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right"><span class="red-600">*</span>奖品名称：</div>
                                        <div class="col-md-4">
                                        <input name="Name" id="@Name@j" onfocus="$('#hadAward').click()" class="form-control" onkeyup="doubleBind(this, 'Congrats1')" value="@Model.awardsList[i].Name">
                                        </div>
                                        <div class="col-md-5">（客户中奖显示字样）</div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right"><span class="red-600">*</span>奖品数量：</div>
                                        <div class="col-md-4">
                                            <input type="text" name="TotalNums" class="form-control " id="@TotalNums@j" value="@Model.awardsList[i].TotalNums"  placeholder="请先指定奖项"  onchange="CalcRate(this,@j)" onclick="judge(this)">
                                            <input type="hidden" name="TotalMoney" id="@TotalMoney@j" value="@Model.awardsList[i].TotalMoney" />
                                        </div>
                                        <div class="col-md-5">（必填, 此奖励送出总量, 送完为止）</div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right">中奖率：</div>
                                        <div class="col-md-4">
                                            <input name="Rate" id="@Rate@j" value="@Model.awardsList[i].Rate" class="form-control " readonly="readonly">
                                        </div>
                                        <div class="col-md-5">%  （当前奖项可设置最大中奖率为 100%）</div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right"><span class="red-600">*</span>操作提示：</div>
                                        <div class="col-md-4">
                                        <input name="Congrats" value="@Model.awardsList[i].Congrats" onfocus="$('#award-details').click()" id="@point@j" class="form-control " onchange="doubleBind(this, 'handleTips')" onkeyup="doubleBind(this, 'handleTips')">
                                        </div>
                                        <div class="col-md-5">购物时凭优惠码联系客服兑奖</div>
                                    </div>
                                    <div class="form-group parent" style="padding-bottom:5px;border-bottom:1px dashed #5cb85c">
                                        <div class="col-md-2 text-right">详情设置</div>
                                        <div class="col-md-9 text-right">
                                            <label class="glyphicon glyphicon-triangle-bottom" style="font-size:18px;" onclick="ShowHideBtn(this)"></label>
                                        </div>
                                    </div>
                                    <div class="toggle-panal " style="display:none">
                                        <div class="form-group">
                                            <div class="col-md-2 text-right">客服电话：</div>
                                            <div class="col-md-8">
                                                <input name="ServicePhone" value="@Model.awardsList[i].ServicePhone" id="@ServicePhone@j" onclick="$('#award-details').click()" class="form-control" onchange="doubleBind(this, 'ServicePhone')" onkeyup="doubleBind(this, 'ServicePhone')">
                                            </div>
                                        </div>
                                        <div class="form-group vailTime" style="display:none;">
                                            <div class="col-md-2 text-right">使用须知：</div>
                                            <div class="col-md-8">
                                                <input name="Remark" id="@Remark@j" onclick="$('#award-details').click()" value="@Model.awardsList[i].Remark" class="form-control " onchange="doubleBind(this, 'MustKnow')" onkeyup="doubleBind(this, 'MustKnow')">
                                            </div>

                                        </div>
                                        <div class="form-group">
                                            <div class="col-md-2 text-right">自定义按钮：</div>
                                            <div class="col-md-6">
                                                <input type="radio" name="ButtonType" value="0" id="@defineClose@j" checked onchange="IsShow(0, '.@DefineBtnTypeClose@j,.DefineBtnTypeClose')" />
                                                &nbsp;
                                                <label for="defineClose">关闭</label>
                                                &nbsp;  &nbsp;
                                                <input type="radio" name="ButtonType" value="1" id="@defineOpen@j" onchange="IsShow(1, '.@DefineBtnLink@j,.DefineBtnLink', '.@DefineBtnAll@j,.DefineBtnAll')" />
                                                &nbsp;
                                                <label for="defineOpen">页面跳转</label>
                                                &nbsp;  &nbsp;
                                                <input type="radio" name="ButtonType" value="2" id="@defineAll@j" onchange="IsShow(2, '.@DefineBtnAll@j,.DefineBtnAll', '.@DefineBtnLink@j,.DefineBtnLink')" />
                                                &nbsp;
                                                <label for="defineAll">一键关注</label>
                                            </div>
                                        </div>
                                        <div class="form-group @DefineBtnTypeClose@j @DefineBtnLink@j" style="display:none">
                                            <div class="col-md-2 text-right">按钮名称：</div>
                                            <div class="col-md-4">
                                                <input value="@Model.awardsList[i].ButtonName" onclick="$('#award-details').click()" name="ButtonName" id="@ButtonName@j" class="form-control " onchange="doubleBind(this, 'defindBtn')" onkeyup="doubleBind(this, 'defindBtn')">
                                            </div>
                                        </div>
                                        <div class="form-group @DefineBtnTypeClose@j @DefineBtnLink@j" style="display:none">
                                            <div class="col-md-2 text-right">按钮链接：</div>
                                            <div class="col-md-4">
                                                <input value="@Model.awardsList[i].ButtonHref" onclick="$('#award-details').click()" name="ButtonHref" id="@ButtonHref@j" class="form-control " onchange="doubleBind(this, '#defindBtn')" onkeyup="doubleBind(this, '#defindBtn')">
                                            </div>
                                        </div>
                                        <div class="form-group @DefineBtnTypeClose@j @DefineBtnAll@j" style="display:none">
                                            <div class="col-md-2 text-right">按钮名称：</div>
                                            <div class="col-md-4">
                                                <input onclick="$('#award-details').click()" name="WxButtonName" class="form-control" value="@Model.awardsList[i].WxButtonName" onchange="doubleBind(this, 'focusUs')" onkeyup="doubleBind(this, 'focusUs')">
                                            </div>
                                        </div>
                                        <div class="form-group @DefineBtnTypeClose@j @DefineBtnAll@j" style="display:none">
                                            <div class="col-md-2 text-right" style="padding:0">微信公众号二维码：</div>
                                            <div class="col-md-8 uploader-list" style="display:flex;align-items:center;">
                                                <img id="@awardsUpImg@j" src="@Model.awardsList[i].WxCodeImg" alt="Alternate Text" style="width:60px;height:60px;border-radius:4px;" />
                                                <div style="margin-left:15px;">
                                                    <label class="btn  btn-success picker" id="@awardsUp@j">上传</label>
                                                    <input type="hidden" name="WxCodeImg" id="@WxCodeImg@j" value="@Model.awardsList[i].WxCodeImg" />
                                                    <p><a href="/ConfigManager/WXHelp" target="_blank">如何获取公众号二维码</a></p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                           <script>
                               //给大转盘的奖项赋值图片
                               $("#img" + @j + ",#tableImg" + @j +",.img"+@j+"").attr("src", "@Model.awardsList[i].AwardsIosUrl");
                               
                               //奖项自定义按钮赋值 单选框
                               var ButtonType = "@Model.awardsList[i].ButtonType";
                               if (ButtonType == "0") IsShow(0, ".DefineBtnTypeClose" +@j +",.DefineBtnTypeClose");
                               else if (ButtonType == "1") IsShow(1, ".DefineBtnLink" +@j +",.DefineBtnLink", ".DefineBtnAll");
                               else if (ButtonType == "2") IsShow(2, ".DefineBtnAll" +@j +",.DefineBtnAll", ".DefineBtnLink");
                               $("#@fromId@j input[name='ButtonType'][value=" + ButtonType + "]").attr("checked", true);
                               $.MGJ.TableEggsActivity.GetAward("@Model.awardsList[i].type", "@j", "@Model.awardsList[i].JackpotID");
                               //判断奖项类型 显示详细设置
                               var type = "@Model.awardsList[i].type";
                            
                            
                               @*if (type=="@_AwardTypeEnum.HB") {//红包
                                   $("@fromId@j .vailTime").hide();
                               }
                               else if (type == "@_AwardTypeEnum.YHJ") {

                               }
                               else if (type == "@_AwardTypeEnum.LLB") {//流量包
                                   $("@fromId@j .vailTime").show();
                               }*@
                             
                           </script>
                            }

                            //新增
                            for (int i = awardsIndex; i <= 8; i++)
                            {
                            var IosImgUrl = "/Content/webImgs/Market/Turntable/price" + @i + ".png";

                            var classformName = i == 1 ? "tab-pane active in form-horizontal parent AwardTab formCheck" : "tab-pane  in form-horizontal parent AwardTab formCheck";

                                <form id="@fromId@i" role="tabpanel" class="@classformName">
                                    <!--排序-->
                                    <input type="hidden" name="Sequence" value="@i" />
                                    <!--图标-->
                                    <input type="hidden" name="AwardsIosUrl" id="AwardsIosUrl0" value="/Content/webImgs/Market/Turntable/price0.png" />
                                    <input type="hidden" name="AwardsIosUrl" id="@AwardsIosUrl@i" value="@IosImgUrl" />
                                    <div class="form-group">
                                        <div class="col-md-2 text-right">奖项等级：</div>
                                        <div class="col-md-4">
                                            <select name="AwardsGrade" id="@AwardsGrade@i" class="form-control " onchange="doubleGradeBind(this,@i)">
                                                <option value="1" selected>一等奖</option>
                                                <option value="2">二等奖</option>
                                                <option value="3">三等奖</option>
                                                <option value="4">四等奖</option>
                                                <option value="5">五等奖</option>
                                                <option value="6">六等奖</option>
                                                <option value="7">七等奖</option>
                                                <option value="8">八等奖</option>
                                            </select>
                                        </div>
                                        <div class="col-md-4"></div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right">奖项类型：</div>
                                        <div class="col-md-4">
                                            <select name="Type" id="@JackpotType@i" class="form-control " onchange="changeJackpotType(this,@i)">
                                                <option value="1">红包</option>
                                                <option value="3">流量包</option>
                                            </select>
                                        </div>
                                        @*<div class="col-md-4">
                                            <a href="#" onclick="$.MGJ.Common.loadurl(this, '/Market/JackpotManage')">创建红包</a>
                                        </div>*@
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right">指定奖项：</div>
                                        <div class="col-md-4">
                                            <select name="JackpotID" id="@JackpotID@i" class="form-control " onchange="$.MGJ.TableEggsActivity.GetAwardNum(@i)"></select>
                                        </div>
                                        <div class="col-md-5">奖品可用数量:<span style="color:#50AE55" id="@JackepotNum@i"></span> </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right"><span class="red-600">*</span>奖品名称：</div>
                                        <div class="col-md-4">
                                        <input name="Name" id="@Name@i" onfocus="$('#hadAward').click()" class="form-control" onkeyup="doubleBind(this, 'Congrats1')">
                                        </div>
                                        <div class="col-md-5">（客户中奖显示字样）</div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right"><span class="red-600">*</span>奖品数量：</div>
                                        <div class="col-md-4">
                                            <input type="text" name="TotalNums" class="form-control " id="@TotalNums@i" placeholder="请先指定奖项"   onchange="CalcRate(this,@i)" onclick="judge(this)">
                                            <input type="hidden" name="TotalMoney" id="@TotalMoney@i" />
                                        </div>
                                        <div class="col-md-5">（必填, 此奖励送出总量, 送完为止）</div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right">中奖率：</div>
                                        <div class="col-md-4">
                                            <input name="Rate" id="@Rate@i" class="form-control " readonly="readonly" value="0.00">
                                        </div>
                                        <div class="col-md-5">%  （当前奖项可设置最大中奖率为 100%）</div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-md-2 text-right"><span class="red-600">*</span>操作提示：</div>
                                        <div class="col-md-4">
                                        <input name="Congrats" onfocus="$('#award-details').click()" id="@point@i"  class="form-control " onchange="doubleBind(this, 'handleTips')" onkeyup="doubleBind(this, 'handleTips')">

                                        </div>
                                        <div class="col-md-5">购物时凭优惠码联系客服兑奖</div>
                                    </div>
                                    <div class="form-group parent" style="padding-bottom:5px;border-bottom:1px dashed #5cb85c">
                                        <div class="col-md-2 text-right">详情设置</div>
                                        <div class="col-md-9 text-right">
                                            <label class="glyphicon glyphicon-triangle-bottom" style="font-size:18px;" onclick="ShowHideBtn(this)"></label>
                                        </div>
                                    </div>
                                    <div class="toggle-panal " style="display:none">
                                        <div class="form-group">
                                            <div class="col-md-2 text-right">客服电话：</div>
                                            <div class="col-md-8">
                                                 <input name="ServicePhone" id="@ServicePhone@i" onclick="$('#award-details').click()" class="form-control" onchange="doubleBind(this, 'ServicePhone')" onkeyup="doubleBind(this, 'ServicePhone')">
                                            </div>
                                        </div>
                                        <div class="form-group vailTime" style="display:none;"  >
                                            <div class="col-md-2 text-right">使用须知：</div>
                                            <div class="col-md-8">
                                            <input name="Remark" id="@Remark@i" onclick="$('#award-details').click()" class="form-control " onchange="doubleBind(this, 'MustKnow')" onkeyup="doubleBind(this, 'MustKnow')">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-md-2 text-right">自定义按钮：</div>
                                            <div class="col-md-6">
                                                <input type="radio" name="ButtonType" value="0" id="@defineClose@i" checked onchange="IsShow(0, '.@DefineBtnTypeClose@i,.DefineBtnTypeClose')" />
                                                &nbsp;
                                                <label for="defineClose">关闭</label>
                                                &nbsp;  &nbsp;
                                                <input type="radio" name="ButtonType" value="1" id="@defineOpen@i" onchange="IsShow(1, '.@DefineBtnLink@i,.DefineBtnLink', '.@DefineBtnAll@i,.DefineBtnAll')" />
                                                &nbsp;
                                                <label for="defineOpen">页面跳转</label>
                                                &nbsp;  &nbsp;
                                                <input type="radio" name="ButtonType" value="2" id="@defineAll@i" onchange="IsShow(2, '.@DefineBtnAll@i,.DefineBtnAll', '.@DefineBtnLink@i,.DefineBtnLink')" />
                                                &nbsp;
                                                <label for="defineAll">一键关注</label>
                                            </div>
                                        </div>
                                        <div class="form-group @DefineBtnTypeClose@i @DefineBtnLink@i" style="display:none">
                                            <div class="col-md-2 text-right">按钮名称：</div>
                                            <div class="col-md-4">
                                                <input value="企业官网" onclick="$('#award-details').click()" name="ButtonName" id="@ButtonName@i" class="form-control " onchange="doubleBind(this, 'defindBtn')" onkeyup="doubleBind(this, 'defindBtn')">
                                            </div>
                                        </div>
                                        <div class="form-group @DefineBtnTypeClose@i @DefineBtnLink@i" style="display:none">
                                            <div class="col-md-2 text-right">按钮链接：</div>
                                            <div class="col-md-4">
                                                <input value="https://www.baidu.com" onclick="$('#award-details').click()" name="ButtonHref" id="@ButtonHref@i" class="form-control " onchange="doubleBind(this, '#defindBtn')" onkeyup="doubleBind(this, '#defindBtn')">
                                            </div>
                                        </div>
                                        <div class="form-group @DefineBtnTypeClose@i @DefineBtnAll@i" style="display:none">
                                            <div class="col-md-2 text-right">按钮名称：</div>
                                            <div class="col-md-4">
                                                <input onclick="$('#award-details').click()" name="WxButtonName" class="form-control" value="关注我们" onchange="doubleBind(this, 'focusUs')" onkeyup="doubleBind(this, 'focusUs')">
                                            </div>
                                        </div>
                                        <div class="form-group @DefineBtnTypeClose@i @DefineBtnAll@i" style="display:none">
                                            <div class="col-md-2 text-right" style="padding:0">微信公众号二维码：</div>
                                            <div class="col-md-8 uploader-list" style="display:flex;align-items:center;">
                                                <img id="@awardsUpImg@i" src="~/Content/webImgs/upLogo/cp_img_tj.png" alt="Alternate Text" style="width:60px;height:60px;border-radius:4px;" />
                                                <div style="margin-left:15px;">
                                                    <label class="btn  btn-success picker" id="@awardsUp@i">上传</label>
                                                    <input type="hidden" name="WxCodeImg" id="@WxCodeImg@i" value="~/Content/webImgs/upLogo/cp_img_tj.png" />
                                                    <p><a href="/ConfigManager/WXHelp" target="_blank">如何获取公众号二维码</a></p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </form>
                            <script>

                                $("#@Name@i").val($("#@AwardsGrade@i option[value='@i']").text());

                                $("#@point@i").val("您中到了" + $("#@AwardsGrade@i option[value='@i']").text());
                            </script>
                              }
                }
                    </div>
                </div>
                <!-----------------------------高级设置-------------------------------------->
                <div id="award4" class="tab-pane fade">
                    <ul class="myTabs nav nav-tabs">
                        <li class="active">
                            <a href="#companyInfo" data-toggle="tab">企业信息</a>
                        </li>
                        <li>
                            <a href="#game" data-toggle="tab">游戏设置</a>
                        </li>
                    </ul>
                    <form class="tab-content formCheck" id="activityInfo_form">
                        <input hidden name="ID" value="@Model.webInfo.ID" />
                        <!-----------------------------高级设置表单-------------------------------------->
                        <div id="companyInfo" class="tab-pane fade active in form-horizontal">
                            <div class="form-group">
                                <div class="col-md-2 text-right">主办单位：</div>
                                <div class="col-md-9">
                                    <input type="text" onfocus="$('#hadAward').click()" onchange="doubleBind(this, 'company1')" onkeyup="doubleBind(this, 'company1')" class="form-control" name="Sponsor" value="@Model.webInfo.Sponsor" />
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-md-2 text-right">链接地址：</div>
                                <div class="col-md-9">
                                    <input type="text" class="form-control" name="UrlAddress" value="@Model.webInfo.UrlAddress" />
                                </div>
                            </div>

                            <div class="form-group parent">
                                <div class="col-md-2 text-right">企业LOGO：</div>
                                <div class="col-md-4">
                                    <input type="radio" name="IsShowLogo" value="0" id="logoDefault" checked="checked" onchange="IsShow(0, '.EnterpriseLogo,.LogoUp')" />
                                    &nbsp;
                                    <label for="logoDefault">默认</label>
                                    &nbsp;  &nbsp;
                                    <input type="radio" name="IsShowLogo" value="1" id="logoDefine" onchange="IsShow(1, '.EnterpriseLogo,.LogoUp'); $('#redIndex').click()" />
                                    &nbsp;
                                    <label for="logoDefine">显示</label>
                                </div>
                            </div>

                            <div class="form-group  LogoUp" style="display:none">
                                <div class="col-md-2 text-right"></div>
                                <div class="col-md-8 uploader-list" style="display:flex;align-items:center;">
                                    <img src="~/Content/webImgs/upLogo/cp_img_tj.png" id="LogoImgUrl" alt="Alternate Text" style="width:60px;height:60px;border-radius:4px;" />
                                    <div style="margin-left:15px;">
                                        <label id="logoUp" class="btn  btn-success picker">上传</label>
                                        <input type="hidden" name="LogoImgUrl" value="@Model.webInfo.LogoImgUrl " />
                                        <p>请上传5M以内，格式为jpg、gif 、png的图片</p>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group  companyPublicCode">
                                <div class="col-md-2 text-right"><span class="red-600">*</span>公众号二维码：</div>
                                <div class="col-md-8 uploader-list" style="display:flex;align-items:center;">
                                    <img onclick="$('#getFinishAward').click()" src="@Model.webInfo.WXCodeImgUrl" id="Upload_WXCodeImgUrl" alt="Alternate Text" style="width:60px;height:60px;border-radius:4px;" />
                                    <div style="margin-left:15px;">
                                        <label onclick="$('#getFinishAward').click()" id="companyPublicCode" class="btn  btn-success picker">上传</label>
                                        <input type="hidden" name="WXCodeImgUrl" id="WXCodeImgUrl" value="@Model.webInfo.WXCodeImgUrl" />
                                        <p>请上传5M以内，格式为jpg、gif 、png的图片</p>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-md-2 text-right">页面加载图片：</div>
                                <div class="col-md-4">
                                    <input type="radio" name="IsLoadImgUrl" value="0" checked="checked" id="loadImgDefault" onchange="IsShow(0, '.LoadingUp')" />
                                    &nbsp;
                                    <label for="loadImgDefault">默认</label>
                                    &nbsp;  &nbsp;
                                    <input type="radio" name="IsLoadImgUrl" value="1" id="loadImgDefine" onchange="IsShow(1, '.LoadingUp')" />
                                    &nbsp;
                                    <label for="loadImgDefine">自定义</label>

                                </div>

                            </div>


                            <div class="form-group  LoadingUp" style="display:none">
                                <div class="col-md-2 text-right"></div>
                                <div class="col-md-8 uploader-list" style="display:flex;align-items:center;">
                                    <img src="~/Content/webImgs/upLogo/cp_img_tj.png" id="LoadingUrl" alt="Alternate Text" style="width:60px;height:60px;border-radius:4px;" />
                                    <div style="margin-left:15px;">
                                        <label id="LoadingUp" class="btn  btn-success picker">上传</label>
                                        <input type="hidden" name="PagelaodImgUrl" value="@Model.webInfo.PagelaodImgUrl" />
                                        <p>请上传5M以内，格式为jpg、gif 、png的图片</p>
                                    </div>
                                </div>
                            </div>



                            <div class="form-group">
                                <div class="col-md-2 text-right">功能按钮：</div>
                                <div class="col-md-6">
                                    <input type="radio" name="FunctionBtnType" checked="checked" value="0" id="funBtnHide" onchange="IsShow(0, '.FunctionBtnTypeClose')" />
                                    &nbsp;
                                    <label for="funBtnHide">隐藏</label>
                                    &nbsp;  &nbsp;
                                    <input type="radio" name="FunctionBtnType" value="1" id="funBtnSkip" onchange="IsShow(1, '.FunctionBtnLink,.FunctionBtnTypeClose', '.FunctionBtnAll'); $('#hadNoAward').click()" />
                                    &nbsp;
                                    <label for="funBtnSkip">页面跳转</label>
                                    &nbsp;  &nbsp;
                                    <input type="radio" name="FunctionBtnType" value="2" id="funBtnAll" onchange="IsShow(1, '.FunctionBtnAll,.FunctionBtnTypeClose', '.FunctionBtnLink'); $('#hadNoAward').click()" />
                                    &nbsp;
                                    <label for="funBtnAll">一键关注</label>

                                </div>

                            </div>


                            <div class="form-group FunctionBtnTypeClose FunctionBtnLink" style="display:none">
                                <div class="col-md-2 text-right">按钮名称：</div>
                                <div class="col-md-4">
                                    <input onfocus="$('#hadnoaward').click()" name="BtnName" class="form-control " value="@Model.webInfo.BtnName" placeholder="企业官网" onkeyup="doubleBind(this, 'FunctionLink');doubleBind(this, 'FinishFunctionLink')" onchange="doubleBind(this, 'FunctionLink');doubleBind(this, 'FinishFunctionLink')">
                                </div>
                            </div>

                            <div class="form-group FunctionBtnTypeClose FunctionBtnLink" style="display:none">
                                <div class="col-md-2 text-right">按钮链接：</div>
                                <div class="col-md-4">
                                    <input onfocus="$('#hadnoaward').click()" name="BtnUrl" id="" class="form-control " value="@Model.webInfo.BtnUrl" placeholder="列如：http://tx.m12315.com" onkeyup="doubleBind(this, '#FunctionLink'); doubleBind(this, '#FinishFunctionLink')" onchange="doubleBind(this, '#FunctionLink'); doubleBind(this, '#FinishFunctionLink')">
                                </div>
                            </div>

                            <div class="form-group FunctionBtnTypeClose FunctionBtnAll" style="display:none">
                                <div class="col-md-2 text-right">按钮名称：</div>
                                <div class="col-md-4">
                                    <input onfocus="$('#hadnoaward').click()" name="BtnName" class="form-control " value="@Model.webInfo.BtnName" placeholder="关注我们" onchange="doubleBind(this, 'FunctionFocus'); doubleBind(this, 'FinishFunctionFocus')" onkeyup="    doubleBind(this, 'FunctionFocus'); doubleBind(this, 'FinishFunctionFocus')">
                                </div>
                            </div>
                            <div class="form-group FunctionBtnTypeClose FunctionBtnAll" style="display:none">
                                <div class="col-md-2 text-right" style="padding:0">微信二维码：</div>
                                <div class="col-md-8 uploader-list" style="display:flex;align-items:center;">
                                    <img src="~/Content/webImgs/upLogo/cp_img_tj.png" id="Upload_BtnCodeImgUrl" alt="Alternate Text" style="width:60px;height:60px;border-radius:4px;" />
                                    <div style="margin-left:15px;">
                                        <label class="btn  btn-success picker" id="weixinCode">上传</label>
                                        <input type="hidden" name="BtnCodeImgUrl" id="BtnCodeImgUrl" value="@Model.webInfo.BtnCodeImgUrl" />
                                        @*<p><a href="#" onclick=" $.MGJ.Common.loadurl(this, '/Market/ErWeiMa')">如何获取公众号二维码</a></p>*@
                                        <p><a href="/ConfigManager/WXHelp" target="_blank">如何获取公众号二维码</a></p>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="game" class="tab-pane fade  form-horizontal">
                            <div class="form-group parent">
                                <div class="col-md-2 text-right">技术支持：</div>
                                <div class="col-md-3">
                                    <label for="adShow">
                                        <input type="radio" name="IsAdvertising" checked="checked" value="1" id="adShow" />&nbsp;&nbsp;&nbsp;显示
                                    </label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label for="adHidden">
                                        <input type="radio" name="IsAdvertising" value="0" id="adHidden" readonly />&nbsp;&nbsp;&nbsp;隐藏
                                    </label>
                                </div>
                                <div class="col-md-6 showhide1">
                                    隐藏广告需要单独购买  <a href="#">立即购买</a>
                                </div>
                            </div>
                            <div class="form-group parent">
                                <div class="col-md-2 text-right">参与人数：</div>
                                <div class="col-md-3">
                                    <label for="gameTimeDefault" onclick="$('#redIndex').click()">
                                        <input type="radio" name="ParticipationNum" value="1" id="gameTimeDefault" checked onchange="IsShow(1, '.defaultInfo','#rollInfo,.rollInfoTxt')" />&nbsp;&nbsp;&nbsp;显示
                                    </label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label for="gameTime" onclick="$('#redIndex').click()">
                                        <input type="radio" name="ParticipationNum" value="0" id="gameTime" onchange="IsShow(0, '.defaultInfo', '#rollInfo,.rollInfoTxt')" />&nbsp;&nbsp;&nbsp;隐藏
                                    </label>
                                </div>
                                <div class="col-md-6 ParticipationNumTxt" style="display:none;">
                                    实际参加人数 <input type="text" name="name" value="@Model.activity.ParticipationNum" style="width:80px;display:inline-block" class="form-control" />
                                </div>
                            </div>
                            <div class="form-group parent">
                                <div class="col-md-2 text-right" style="padding:0">
                                    <img src="~/Content/webImgs/Market/redPacket/diamond.png" style="width:15px;height:13px" />
                                    轮播获奖信息：
                                </div>
                                <div class="col-md-3">
                                    <label for="awardInfoDefault" onclick="$('#redIndex').click()">
                                        <input type="radio" name="IsRollInfo" value="1" id="awardInfoDefault" onchange="IsShow(1, '#rollInfo,.rollInfoTxt', '.defaultInfo')" />&nbsp;&nbsp;&nbsp;开启
                                    </label>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <label for="awardInfoDefine" onclick="$('#redIndex').click()">
                                        <input checked="checked" type="radio" name="IsRollInfo" value="0" id="awardInfoDefine" onchange="IsShow(0, '#rollInfo,.rollInfoTxt', '.defaultInfo')" />&nbsp;&nbsp;&nbsp;关闭
                                    </label>
                                </div>
                                <div class="col-md-6 rollInfoTxt" style="display:none">
                                    有三名玩家中奖后，活动轮播将显示最新的信息，优先级高的优先！
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

@*模态框（Modal）*@
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">编辑图片</h4>
            </div>
            <div class="modal-body">
                <div class="col-sm-5" id="showImg">
                    <img id="ModalImg"/>
                </div>
                <label class="btn btn-success picker" id="lak">上传替换</label>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="tableModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">编辑图片</h4>
            </div>
            <div id="modal_body" class="modal-body row">
                <div class="modal_body_row">
                    <span>抽奖按钮:</span>
                    <div class="showImg">
                        <img src="" id="tableGo" />
                    </div>
                    <label class="btn btn-success picker lak" id="loadGo">
                        上传替换
                    </label>
                </div>
                <div class="modal_body_row">
                    <span>谢谢参与:</span>
                    <div class="showImg">
                        <img src="" id="tableImg0" />
                    </div>
                    <label class="btn btn-success picker lak" id="loadImg0">
                        上传替换
                    </label>
                </div>
                <div class="modal_body_row">
                    <span>奖项一:</span>
                    <div class="showImg">
                        <img src="" id="tableImg1" />
                    </div>
                    <label class="btn btn-success picker lak" id="loadImg1">
                        上传替换
                    </label>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-danger" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $("#img0,#img2,#img4,#img5,#img6").attr("src", $("#AwardsIosUrl0").val()).addClass("img0");
    $("#img1,#img3,#img7").attr("src", $("#AwardsIosUrl1").val()).addClass("img1");
    $("#go").attr("src", "/Content/webImgs/Market/Turntable/priceCenter.png");

    //解决九宫格被图片撑大问题
    $("#jgg td").css({ "width": "62px", "height": "62px" });
    function changeBox(ele) {
        if (ele <= 6) {
            $("#jgg td").css({ "width": "62px", "height": "62px" });
        }
        else {
            $("#jgg td").css({ "width": "45px", "height": "45px" });
            $("#center_td").css({ "width": "95px", "height": "95px" })
        }
    }

    //当前页
    var pageTabIndex = 1;
    //总页数
    var pageCount = document.getElementById('myTab').getElementsByTagName('li').length;
    awardCallBack(pageCount);
    modelAdd(pageCount);
    //奖项
    $("#add").click(function () {
        pageCount = document.getElementById('myTab').getElementsByTagName('li').length;
        if (pageCount < 8) {
            pageCount++;
            var li = '<li><a href="#Award0' + pageCount + '" data-toggle="tab" id="i' + pageCount + '" onclick="$.MGJ.TableEggsActivity.SkipTab(' + pageCount + ',' + "'add'" + ')"  >奖项' + $my.NumShiftChinese(pageCount) + '</a></li>';
            $("#myTab").append(li);
            $("#myTab li:last").siblings().removeClass("active");
            $("#myTab li:last").addClass("active");
            var index = $("#myTab li").length;
            $("#myTabContent form").hide();
            $("#myTabContent form").eq(index - 1).show();
            $.MGJ.TableEggsActivity.SkipTab(pageCount, "add");
            awardCallBack(pageCount)
            if (pageTabIndex > 6) {
                addGrid()
            }
            awardCallBack(pageTabIndex)
            //循环创建之前先删除之前创建的
            $("#modal_body>div:nth-child(3)").nextAll().remove();
            modelAdd(pageTabIndex);
            changeBox(pageTabIndex)
        }
        else {
            return
        }
    })
    $("#del").click(function () {
        pageCount = $("#myTab li").length;
        if (pageCount > 1) {
            pageCount--;
            if (pageCount < 7) {
                deleteGrid()
            }
            awardCallBack(pageCount)
            //循环创建之前先删除之前创建的
            $("#modal_body>div:nth-child(3)").nextAll().remove();
            modelAdd(pageCount);
            changeBox(pageCount);
            awardCallBack(pageCount);
            //删除最后奖项
            $("#myTab").find("li:last").remove();
            $("#myTab li:last").siblings().removeClass("active");
            var index = $("#myTab li").length;
            $("#myTabContent form").hide();
            $("#myTab li").eq(pageCount - 1).addClass("active");
            $("#myTabContent form").eq(index - 1).show();
            $("#myTab li").eq(index - 1).addClass("active");
        }
        else {
            return;
        }
    })

    var oper = "@ViewBag.Oper";
    if (oper == "edit") {
        var Batch = "@Model.activity.Batch";
        if (Batch.indexOf(',') >= 0) {
            var batchArr = Batch.split(',');
            var BatchNum = 0;
            for (var i = 0; i < batchArr.length ; i++) {
                BatchNum += $("#batch option[value='" + batchArr[i] + "']").attr("num");
            }
            $("#batchNum").text(BatchNum);
        }
        else {
            var a = $("#batch option[value='" + Batch + "']").attr("num")
            $("#batchNum").text($("#batch option[value='" + Batch + "']").attr("num"));
        }
        var Privance="@Model.activity.Privance";
        //if (Privance != null) {
           
        //    $("#Privance ").val(Privance);
        //}
        @*$("input[name='IsParticipationLimit'][value=@Model.activity.IsParticipationLimit]").attr("checked", true);
        IsShow('@Model.activity.IsParticipationLimit', '.participationnum')*@
        $("input[name='RewardObject'][value=@Model.activity.RewardObject]").attr("checked", true);
        $("input[name='IsRepetition'][value=@Model.delivery.IsRepetition]").attr("checked", true);
        $("input[name='IsLoadImgUrl'][value=@Model.webInfo.IsLoadImgUrl]").attr("checked", true);
        var IsShowLogo = "@Model.webInfo.IsShowLogo";
        if (IsShowLogo == 1) {
            $("input[name='IsShowLogo'][value=@Model.webInfo.IsShowLogo]").attr("checked", true);
            IsShow(1, '.EnterpriseLogo,.LogoUp'); $('#redIndex').click()
            var imgLogo = '@Model.webInfo.LogoImgUrl';
            if (imgLogo) $("#LogoImgUrl").attr('src', imgLogo);
        }
        var IsLoadImgUrl = "@Model.webInfo.IsLoadImgUrl";
        if (IsLoadImgUrl == 1) IsShow(1, '.LoadingUp');
        $("#LoadingUrl").attr("src", "@Model.webInfo.PagelaodImgUrl");
        $("#Upload_BtnCodeImgUrl").attr("src", "@Model.webInfo.BtnCodeImgUrl");
        $("input[name='BtnCodeImgUrl']").val("@Model.webInfo.BtnCodeImgUrl");
        $("input[name='IsLoadImgUrl'][value=@Model.webInfo.IsLoadImgUrl]").attr("checked", true);
        var FunctionBtnType = "@Model.webInfo.FunctionBtnType";
        if (FunctionBtnType == 0) IsShow(0, '.FunctionBtnTypeClose')
        else if (FunctionBtnType == 1) IsShow(1, '.FunctionBtnLink,.FunctionBtnTypeClose', '.FunctionBtnAll');
        else if (FunctionBtnType == 2) IsShow(1, '.FunctionBtnAll,.FunctionBtnTypeClose', '.FunctionBtnLink');
        $("input[name='FunctionBtnType'][value=@Model.webInfo.FunctionBtnType]").attr("checked", true);
        $("input[name='IsAdvertising'][value=@Model.webInfo.IsAdvertising]").attr("checked", true);
        // $("input[name='joinNum'][value=Model.webInfo.joinNum]").attr("checked",true);
        $("input[name='IsRollInfo'][value=@Model.webInfo.IsRollInfo]").attr("checked", true);
        $("input[name='IsShare'][value=@Model.webInfo.IsShare]").attr("checked", true);
        $("input[name='IsWxShareImg'][value=@Model.webInfo.IsWxShareImg]").attr("checked", true);
        Ajax_BatchBox('@Model.activity.Batch');
    }
    else {
        //默认奖项类型红包
        $.MGJ.TableEggsActivity.GetAward(1, 1, 0, "add");

    }
    //start 奖项详情

    //end 奖项详情

    //分享开始
    @{int IsShareImgUrl = Model.webInfo.IsShareImgUrl == null ? 0 :(int)Model.webInfo.IsShareImgUrl;};
    var isShareImgUrl = '@IsShareImgUrl';
    var aType = '@Model.activity.ActivityType';
    var redData = '@EnumManagement.GetEnumValue(ActivityTypeEnum.redData)';
    var ShareImgUrl = '@Model.webInfo.IsWxShareImg';
    @{int IsShareContont = Model.webInfo.IsShareImgUrl == null ? 0 : (int)Model.webInfo.IsShareContont;};
    var IsShareContont = '@IsShareContont';
    var ShareContont = '@Model.webInfo.ShareContont';
    if (aType == redData) {
        var RedDataShareImgUrl = "http://tapp.m12315.com/Content/Images/%e6%b4%bb%e5%8a%a8%e5%88%9b%e5%bb%ba/redPacket/middle.png";
        var RedShareContont = "千万红包免费领取,点我抢红包,在晚点就没了........";
        if (isShareImgUrl == 0) $("#ShareImgUrl").attr('src', RedDataShareImgUrl);//抢红包分享图标默认值
        if (ShareImgUrl == "") $("#ShareImgUrl").attr('src', RedDataShareImgUrl);//抢红包分享图标默认值
        if (IsShareContont == 0) $("#ShareContont").val(RedShareContont);//抢红包分享图标默认值
        if (ShareContont == "") $("#ShareContont").val(RedShareContont);//抢红包分享图标默认值
    }
    var ShareImgUrl = '';
    if (ShareImgUrl) $("#ShareImgUrl").attr('src', ShareImgUrl);
    //分享结束

    //限制区域
    var i = 1;
    var IsLimitArea = '@Model.activity.IsLimitArea';
    if (IsLimitArea == "1") {
        //$('#IsLimit').parent().parent().next().toggle();
        IsLimitAreaFun('#IsLimit');
    }
    function IsLimitAreaFun(e) {
        $(e).parent().parent().next().toggle();
        if (i == 0) {
            $("#IsLimitArea").val(0);
            i = 1;
        }
        else {
            $("#IsLimitArea").val(1);
            i = 0;
        }
    }
    function BtnCustom() {
        $('#redIndex').click();
        $('#red1 .OneKeyAttention').css('display', 'block');
    }
    $(".SkipAwInfo").click(function () {
        $('#red3').attr('class', 'tab-pane fade  phoneView');
        $('#red4').attr('class', 'tab-pane fade  phoneView active in');
    })
    //活动详情 关注我们
    function AwAttention() {
        $('#red4 .OneKeyAttention').css('display', 'block');
        $("#awardsUpCode").attr("src", $("#WxCodeImg" + pageTabIndex).val());
    }
</script>